package com.lotter.api.controller;

import javax.servlet.ServletContext;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.web.context.ServletContextAware;

import com.lotter.api.service.OnlineUserService;

@Component
public class SysInitInfo implements InitializingBean, ServletContextAware{

	@Autowired
	private OnlineUserService onlineUserService;
	
	@Override
	public void setServletContext(ServletContext servletContext) {
		System.out.println("--------系统完成初始化信息");	
	}

	@Override
	public void afterPropertiesSet() throws Exception {
		onlineUserService.initOnlingUser();
	}

}
